<!DOCTYPE html>
<html>
<head>
    %{--<meta name="layout" content="main"/>--}%
    %{--<asset:stylesheet src="homer/vendor/bootstrap/dist/css/bootstrap.min.css" />--}%
    <asset:stylesheet src="homer/style.css" />
    <asset:javascript src="homer/vendor/jquery/dist/jquery.min.js" />
    <title>${cityName}分析报告</title>
    <style>
    .table>tbody>tr>td{
        vertical-align: middle;
    }
    #estateStart{
        width: 210mm;
        height: 100mm;
    }
    #communityPriceTrend{
        width: 210mm;
        height: 100mm;
    }
    .table-bordered>tbody>tr>td, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>td, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>thead>tr>th{
        border: 1px solid #ddd;
        border-spacing: 0;
        border-collapse: collapse;
        padding: 6px;
        text-align: center;
    }
    .printA{
        width: 100mm!important;
    }
    .hpanel .panel-body{
        border: none;
    }
    @media print {
        .printBreak{
            page-break-after:always;
        }
        .distanceTop{
            margin-top: 25mm;
        }
        @page {
            size: auto;  /* auto is the initial value */
            margin: 0mm; /* this affects the margin in the printer settings */
        }
        .footer{
            display: none;
        }
        .hpanel .panel-body {
            border: none;
        }
        table {
            page-break-inside: avoid;
        }
        .color1{
            color: #FF0000!important;
        }

        #estateStart{
            width: 210mm;
            height: 100mm;
        }
        #communityPriceTrend{
            width: 210mm;
            height: 100mm;
        }
        .hpanel .panel-body{
            border: none;
        }

    }

    </style>
</head>

<body class="fixed-navbar fixed-sidebar"  >
<div align="center" style="margin-top: 10mm;"><A1 >${cityName}分析报告</A1></div>
<div class="content animate-panel printBreak">
    <input type="hidden" id="city" value="${zoneNumber}">
    <div class="row">
        <div class="hpanel hgreen ">
            <div class="panel-heading" style="margin-top: 5mm;">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                押品分析

            </div>
            <div class="panel-body printBreak" style="border-bottom: none; padding-bottom: 0;">
                <div>
                    <h4 style="font-size: 13px;">城市/行政区押品分布</h4>
                    <g:if test="${estateCounts != 0}">
                        <span><strong>${this.accountName}</strong> 押品分布在 <strong class="color1">${districtCounts}</strong> 个行政区，共 <strong style="color: #FF0000;">${estateCounts}</strong> 件押品，其中在 <strong style="color: #62cb31;">${districtName1}</strong> 的数量最多，有 <strong style="color: #FF0000;">${districtEstateCounts1}</strong> 件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${districtEstateCounts1/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，其次为 <strong style="color: #62cb31;">${districtName2}</strong> 和 <strong style="color: #62cb31;">${districtName3}</strong>，押品数量分别为 <strong style="color: #FF0000;">${districtEstateCounts2}</strong> 件和 <strong style="color: #FF0000;">${districtEstateCounts3}</strong> 件，分别占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${districtEstateCounts2/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong> 和 <strong style="color: #FF0000;"><g:formatNumber number="${districtEstateCounts3/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong></span>
                    </g:if>
                    <g:else>
                        <span><strong>${this.accountName}</strong> 押品分布在 <strong class="color1">${districtCounts}</strong> 个行政区，共 <strong style="color: #FF0000;">${estateCounts}</strong> 件押品，其中在 <strong style="color: #62cb31;">${districtName1}</strong> 的数量最多，有 <strong style="color: #FF0000;">${districtEstateCounts1}</strong> 件，占全量押品的 <strong  style="color: #FF0000;">0.00%</strong>，其次为 <strong style="color: #62cb31;">${districtName2}</strong> 和 <strong style="color: #62cb31;">${districtName3}</strong>，押品数量分别为 <strong style="color: #FF0000;">${districtEstateCounts2}</strong> 件和 <strong style="color: #FF0000;">${districtEstateCounts3}</strong> 件，分别占全量押品的 <strong style="color: #FF0000;">0.00%</strong> 和 <strong style="color: #FF0000;">0.00%</strong></span>
                    </g:else>
                </div>
                <div>
                    <h4 style="font-size: 13px;">小区级押品分布</h4>
                    <g:if test="${estateCounts != 0}">
                        <span>全量押品分布在 <strong style="color: #FF0000;">${communityCounts}</strong> 个小区中，押品数量最多的小区为 <strong style="color: #62cb31;">${d1}</strong> 的 <strong style="color: #62cb31;">${c1}</strong> 和 <strong style="color: #62cb31;">${d2}</strong> 的 <strong style="color: #62cb31;">${c2}</strong> 两个小区，其中分布占比 <strong style="color: #FF0000;"><g:formatNumber number="${t1/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong> 和 <strong style="color: #FF0000;"><g:formatNumber number="${t2/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong></span>
                    </g:if>
                    <g:else>
                        <span>全量押品分布在 <strong style="color: #FF0000;">${communityCounts}</strong> 个小区中，押品数量最多的小区为 <strong style="color: #62cb31;">${d1}</strong> 的 <strong style="color: #62cb31;">${c1}</strong> 和 <strong style="color: #62cb31;">${d2}</strong> 的 <strong style="color: #62cb31;">${c2}</strong> 两个小区，其中分布占比 <strong style="color: #FF0000;">0.00%</strong> 和 <strong style="color: #FF0000;">0.00%</strong></span>
                    </g:else>
                    <div></div>
                </div>
                <h4 class="showhide " style="padding: 0;margin: 0;margin-right: 0px;padding-left: 0px;background: #fff;padding-top: 10px;padding-bottom: 10px;font-size: 13px;cursor: pointer;color: #62cb31;font-weight: bold;">top20小区押品数量
                    <div class="panel-tools pull-right">
                        <a class=""><i class="fa fa-chevron-down" style="font-size: 13px; margin-right: 9px;"></i></a>
                    </div>
                </h4>
                <div class="" style="border:none;">
                    <div class="table-responsive">
                        <table cellpadding="0" cellspacing="0" class="table-bordered" id="esateTable" style="width:100%; border: 1px solid #ddd;">
                            <thead>
                            <tr>
                                <td>城市</td>
                                <td>行政区</td>
                                <td>小区名称</td>
                                <td>押品数量</td>
                            </tr>
                            </thead>
                            <tbody>
                            <g:each in="${top20CommunityList}">
                                <tr>
                                    <td class="text-center">${it?.city}</td>
                                <td class="text-center">${it?.district}</td>
                                <td class="text-center">${it?.community}</td>
                                <td class="text-center">${it?.counts}</td>
                                </td>
                            </tr>
                            </g:each>
                            </tbody>
                        </table>
                    </div>



                </div>
            </div>

            <div class="row distanceTop">
                <div class="hpanel" style="">

                    <div class="col-md-12">
                        <div class="hpanel">


                        </div>

                        <div>
                            <h4 style="padding:0;margin:0; background: #fff; padding-top: 5px;padding-bottom: 10px; border: none;font-size: 13px;cursor: pointer;color: #62cb31;font-weight: bold"><strong>top5小区价格变动趋势</strong></h4>
                            <div id="communityPriceTrend"></div>
                        </div>


                    </div>
                </div>
            </div>
        </div>



    </div>
    <div class="row ">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                贷款分析
            </div>
            <div class="panel-body">
                <div class="printBreak">
                    <h4 style="font-size: 13px;">押品押入期分布</h4>
                    <span><strong>${accountName}</strong> 全量押品押入期主要集中在 <strong style="color: #FF0000;"><span id="y1">年、</span></strong><strong style="color: #FF0000;"><span id="y2">年、</span></strong> <strong style="color: #FF0000;"><span id="y3">年、</span></strong>各年份放款数量如下：</span>
                    <div id="estateStart" class=""></div>
                </div>
                <div class="distanceTop">
                    <h4 style="font-size: 13px;">押品剩余还款期分布</h4>
                    <g:if test="${estateCounts != 0}">
                        <span><strong>${accountName}</strong> 按剩余还款期限统计押品数量，剩余还款期限在 <strong style="color: #FF0000;">${remainTimeList[0].remainTime}</strong> 的押品数据最多，包括 <strong style="color: #FF0000;">${remainTimeList[0].counts}</strong> 件押品，占总量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${remainTimeList[0].counts/estateCounts * 100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>；其次是剩余还款期限在 <strong style="color: #FF0000;">${remainTimeList[1].remainTime}</strong> 年的押品，包括 <strong style="color: #FF0000;">${remainTimeList[1].counts}</strong> 件押品，占总量押品的<strong style="color: #FF0000;"><g:formatNumber number="${remainTimeList[1].counts/estateCounts * 100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>。</span>
                    </g:if>
                    <g:else>
                        <span><strong>${accountName}</strong> 按剩余还款期限统计押品数量，剩余还款期限在 <strong style="color: #FF0000;">${remainTimeList[0].remainTime}</strong> 的押品数据最多，包括 <strong style="color: #FF0000;">${remainTimeList[0].counts}</strong> 件押品，占总量押品的 <strong style="color: #FF0000;">0.00%</strong>；其次是剩余还款期限在 <strong style="color: #FF0000;">${remainTimeList[1].remainTime}</strong> 年的押品，包括 <strong style="color: #FF0000;">${remainTimeList[1].counts}</strong> 件押品，占总量押品的<strong style="color: #FF0000;">0.00%</strong>。</span>
                    </g:else>
                    <div class="table-responsive">
                        <table cellpadding="0" cellspacing="0" class="table-bordered" style="width:100%;">
                            <thead>
                            <tr>
                                <td>剩余还款期</td><td>押品数量</td><td>占比</td>
                            </tr>
                            </thead>
                            <tbody>
                            <g:each in="${remainTimeList}">
                                <tr>
                                    <td class="text-center">${it?.remaintime}</td>
                                <td class="text-center">${it?.counts}</td>
                                <td class="text-center"><g:if test="${estateCounts != 0}"><g:formatNumber number="${it?.counts/estateCounts * 100}" minFractionDigits="2" maxFractionDigits="2"/></g:if><g:else>0.00</g:else>%</td>
                                </td>
                            </tr>
                            </g:each>
                            </tbody>
                        </table>
                    </div>
                </div>
                    <h4 style="font-size: 13px;">逾期押品情况预警</h4>
                    <span><strong>${accountName}</strong> 有 <strong style="color: #FF0000;">${overdueCounts}</strong> 件押品，超过还款期限，仍未偿还完，针对这部分押品，银行应该特别重视，以下是逾期押品分布情况：</span>
                    <div class="table-responsive">
                        <table cellpadding="0" cellspacing="0" class="table-bordered"  style="width:100%;">
                            <thead>
                            <tr>
                                <td>小区名称</td><td>逾期押品数量</td><td>小区基准价（当前</td><td>押品编号</td><td>受理网点</td>
                            </tr>
                            </thead>
                            <tbody>
                            <g:each in="${overdueList}">
                                <tr>
                                    <td class="text-center">${it?.communityName}</td>
                                <td class="text-center">${it?.overnumbers}</td>
                                <td class="text-center">${it?.standardPrice}</td>
                                <td class="text-center">${it?.externalId}</td>
                                <td class="text-center">${it?.accountName}</td>
                                </td>
                            </tr>
                            </g:each>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div>
                    <h4 style="font-size: 13px;">押品重估价值</h4>
                    <g:if test="${currentTotalPrice != 0}">
                        <span><strong>${accountName}</strong> 的押品在 <strong style="color: #62cb31;">${cityName}</strong> 有 <strong style="color: #FF0000;">${estateCounts}</strong> 件，全量押入期（评估机构评估总价）价值为 <strong style="color: #FF0000;"><g:formatNumber number="${loanTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></strong> 亿，重估期（当前系统评估总价）价值总额为 <strong style="color: #FF0000;"><g:formatNumber number="${currentTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></strong> 亿元，增幅为 <strong style="color: #FF0000;"><g:formatNumber number="${(currentTotalPrice-loanTotalPrice) / currentTotalPrice * 100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>。</span>
                    </g:if>
                    <g:else>
                        <span><strong>${accountName}</strong> 的押品在 <strong style="color: #62cb31;">${cityName}</strong> 有 <strong style="color: #FF0000;">${estateCounts}</strong> 件，全量押入期（评估机构评估总价）价值为 <strong style="color: #FF0000;"><g:formatNumber number="${loanTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></strong> 亿，重估期（当前系统评估总价）价值总额为 <strong style="color: #FF0000;"><g:formatNumber number="${currentTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></strong> 亿元，增幅为 <strong style="color: #FF0000;">0.00%</strong>。</span>
                    </g:else>
                    <div class="">
                        <table cellpadding="0" cellspacing="0" class="table-bordered" style="width: 100%">
                            <thead>
                            <tr>
                                <td>放款年份</td><td>押入期总价(亿元)</td><td>重估期总价(亿元)</td><td>增幅</td>
                            </tr>
                            </thead>
                            <tbody>
                            <g:each in="${evaluateList}">
                                <tr>
                                    <td class="text-center">${it?.startDate}</td>
                                <td class="text-center"><g:formatNumber number="${it?.loanTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></td>
                                <td class="text-center"><g:formatNumber number="${it?.currentTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></td>
                                <td class="text-center"><g:formatNumber number="${it?.amplitude * 100}" minFractionDigits="2" maxFractionDigits="2"/>%</td>
                                </td>
                            </tr>
                            </g:each>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>






<asset:javascript src="print/jquery.PrintArea.js" />
<g:javascript>

$(document).ready(function(){
    var iID=setTimeout("clock()",1500);//或者var iID=setTimeout(clock,2000);
})
function clock(){
     window.print()
}
</g:javascript>

<asset:javascript src="echarts/echarts-all-3.js" />
<asset:javascript src="main/reportPrinting.js" />
</body>
</html>
